package com.hzpd.hainan.api;

import com.hzpd.hainan.model.SuperEntity;
import com.hzpd.hainan.model.base.BaseEntity;
import com.hzpd.hainan.model.news.AlbumDetailEntity;
import com.hzpd.hainan.model.news.CommenEntity;
import com.hzpd.hainan.model.news.AlbumDetailEntity;
import com.hzpd.hainan.model.news.CommenEntity;
import com.hzpd.hainan.model.news.HotSearchEntity;
import com.hzpd.hainan.model.news.IsCollectionEntity;
import com.hzpd.hainan.model.news.NewsChannelEntity;
import com.hzpd.hainan.model.news.NewsDetailEntity;
import com.hzpd.hainan.model.news.NewsFlashEntity;
import com.hzpd.hainan.model.news.NewsListEntity;
import com.hzpd.hainan.model.news.NewsTagEntity;
import com.hzpd.hainan.model.newspager.DataEntity;
import com.hzpd.hainan.model.newspager.JournalEntity;
import com.hzpd.hainan.model.newspager.NodeEntity;
import com.hzpd.hainan.model.newspager.XinWenEntity;
import com.hzpd.hainan.model.usercenter.CollectEntity;
import com.hzpd.hainan.model.usercenter.ComEntity;
import com.hzpd.hainan.model.usercenter.EmptyEntity;
import com.hzpd.hainan.model.usercenter.EmptyEntityList;
import com.hzpd.hainan.model.usercenter.UserBean;
import com.hzpd.hainan.model.usercenter.UserEntity;
import com.hzpd.hainan.model.news.SubjectTypeEntity;
import com.hzpd.hainan.model.newspager.DataEntity;
import com.hzpd.hainan.model.newspager.JournalEntity;
import com.hzpd.hainan.model.newspager.NodeEntity;
import com.hzpd.hainan.model.newspager.XinWenEntity;
import com.hzpd.hainan.model.version.VersionBean;
import com.hzpd.hainan.model.version.VersionEntity;
import com.hzpd.hainan.model.video.VideoDetialEntity;
import com.hzpd.hainan.model.video.VideoItenEntity;
import com.hzpd.hainan.model.welcome.ImageEntity;
import com.hzpd.hainan.model.zhuanti.ZhuanTiEntity;

import java.util.Map;

import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.Streaming;
import retrofit2.http.Url;
import rx.Observable;

/**
 * Created by 猪猪侠 on 2017/6/30.
 */

public interface BaseHttpService {

    //获取开屏图接口
    @FormUrlEncoded
    @POST(InterfaceJsonfile.mAdPic)
    Observable<ImageEntity> welcomeAd(@FieldMap Map<String, String> map);
    //获取栏目
    @FormUrlEncoded
    @POST(InterfaceJsonfile.CHANNELLIST)
    Observable<NewsChannelEntity> newsChannellist(@FieldMap Map<String, String> map);


    //检查版本更新;
    @POST(InterfaceJsonfile.UPDATA)
    Observable<VersionEntity> checkUpdata();

    //更新app 下载地址
    @Streaming
    @GET
    Observable<ResponseBody> downLoadFile(@Url String filePath);
    /**
     * news
     *
     */
    //新闻模块--幻灯数据
    @FormUrlEncoded
    @POST(InterfaceJsonfile.FLASH)
    Observable<NewsFlashEntity> newsFlashlist(@FieldMap Map<String, String> map);

    //新闻模块--新闻列表
    @FormUrlEncoded
    @POST(InterfaceJsonfile.NEWSLIST)
    Observable<NewsListEntity> newslist(@FieldMap(encoded = true) Map<String, String> map);

    //新闻详情--获取新闻详情接口
    @FormUrlEncoded
    @POST(InterfaceJsonfile.NEWSDETAIL)
    Observable<NewsDetailEntity> newsDetail(@FieldMap Map<String, String> map);

    //新闻详情--发表评论接口
    @FormUrlEncoded
    @POST(InterfaceJsonfile.PUBLISHCOMMENT)
    Observable<BaseEntity> newsComment(@FieldMap(encoded = true) Map<String, String> map);

    //新闻详情--判断是否收藏状态接口
    @FormUrlEncoded
    @POST(InterfaceJsonfile.ISCELLECTION)
    Observable<IsCollectionEntity> newsIsCollection(@FieldMap Map<String, String> map);

    //新闻详情--添加收藏
    @FormUrlEncoded
    @POST(InterfaceJsonfile.ADDCOLLECTION)
    Observable<IsCollectionEntity> newsAddCollection(@FieldMap Map<String, String> map);

    //新闻模块--不感兴趣列表
    @FormUrlEncoded
    @POST(InterfaceJsonfile.NEWSLOSEINTERESTTAGS)
    Observable<NewsTagEntity> newsLoseInterestTags(@FieldMap Map<String, String> map);

    //新闻模块--提交不感兴趣
    @FormUrlEncoded
    @POST(InterfaceJsonfile.NEWSLOSEINTEREST)
    Observable<BaseEntity> newsLoseInterest(@FieldMap Map<String, String> map);
    /**
     * video
     */
    //视频--视频列表
    @FormUrlEncoded
    @POST(InterfaceJsonfile.VIDEOLIST)
    Observable<VideoItenEntity> videoList(@FieldMap(encoded = true) Map<String, String> map);

    //视频--视频详情
    @FormUrlEncoded
    @POST(InterfaceJsonfile.GETVIDEOINFO)
    Observable<VideoDetialEntity> getvideoinfo(@FieldMap(encoded = true) Map<String, String> map);





    //登陆
    @FormUrlEncoded
    @POST(InterfaceJsonfile.LOGIN)
    Observable<UserEntity> login(@FieldMap(encoded = true) Map<String, String> map);

    //修改密码
    @FormUrlEncoded
    @POST(InterfaceJsonfile.CHANGEPWD)
    Observable<EmptyEntity> changePassWord(@FieldMap Map<String, String> map);

    //找回密码
    @FormUrlEncoded
    @POST(InterfaceJsonfile.FINDPWD)
    Observable<EmptyEntity> findPw(@FieldMap Map<String, String> map);
    //三方登录
    @FormUrlEncoded
    @POST(InterfaceJsonfile.thirdLogin)
    Observable<UserEntity> thirdLogin(@FieldMap(encoded = true) Map<String, String> map);
    //注册
    @FormUrlEncoded
    @POST(InterfaceJsonfile.REGISTER)
    Observable<UserEntity> register(@FieldMap Map<String, String> map);
     //修改用户信息
    @FormUrlEncoded
    @POST(InterfaceJsonfile.CHANGEPINFO)
    Observable<UserEntity> changeUser(@FieldMap(encoded = true) Map<String, String> map);
    @FormUrlEncoded
    @POST(InterfaceJsonfile.CHANGEPINFO)
    Observable<UserEntity> changeUser_PHOTO(@FieldMap Map<String, String> map);


    //发表反馈
    @FormUrlEncoded
    @POST(InterfaceJsonfile.feedback)
    Observable<EmptyEntity> userSuggest(@FieldMap Map<String, String> map);
    //收藏
    @FormUrlEncoded
    @POST(InterfaceJsonfile.COLLECTIONLIST)
    Observable<CollectEntity> collection(@FieldMap Map<String, String> map);
    //删除收藏
    @FormUrlEncoded
    @POST(InterfaceJsonfile.COLLECTION_DELETE)
    Observable<EmptyEntity> deletecollection(@FieldMap Map<String, String> map);
    //我的评论
    @FormUrlEncoded
    @POST(InterfaceJsonfile.COMM_MY)
    Observable<ComEntity> my_comm(@FieldMap Map<String, String> map);

    //新闻详情--评论列表
    @FormUrlEncoded
    @POST(InterfaceJsonfile.CHECKCOMMENT)
    Observable<CommenEntity> newsCommentList(@FieldMap Map<String, String> map);

    //新闻--热门搜索
    @GET(InterfaceJsonfile.HOTSEARCH)
    Observable<HotSearchEntity> newsHotSearch();


    //新闻--热门搜索
    @FormUrlEncoded
    @POST(InterfaceJsonfile.HOTSEARCHNEW)
    Observable<HotSearchEntity> newsHotSearchnew(@FieldMap Map<String, String> map);
    //新闻--搜索新闻
    @FormUrlEncoded
    @POST(InterfaceJsonfile.SEARCH)
    Observable<NewsListEntity> newsSearch(@FieldMap Map<String, String> map);

    //新闻--添加统计接口
    @FormUrlEncoded
    @POST(InterfaceJsonfile.NEWSCOUNT)
    Observable<BaseEntity> newsAddCount(@FieldMap Map<String, String> map);

    //图集--详情接口
    @FormUrlEncoded
    @POST(InterfaceJsonfile.ALBUMIINFO)
    Observable<AlbumDetailEntity> albumDetail(@FieldMap Map<String, String> map);


    //专题--专题栏目
    @FormUrlEncoded
    @POST(InterfaceJsonfile.GETSUBJECTLIST)
    Observable<ZhuanTiEntity> getSubjectList(@FieldMap Map<String, String> map);
    //专题--专题栏目
    @FormUrlEncoded
    @POST(InterfaceJsonfile.SUBJECTCOLUMNSLIST)
    Observable<SubjectTypeEntity> newsSubjectColumn(@FieldMap Map<String, String> map);

    //专题--栏目下的新闻列表
    @FormUrlEncoded
    @POST(InterfaceJsonfile.SUBJECTNEWSLIST)
    Observable<NewsListEntity> newsSubjectNewsList(@FieldMap Map<String, String> map);

    //数字报--下载数字报详情
    @Streaming
    @GET
    Observable<NodeEntity> downloadNodeFile(@Url String filePath);

    //数字报--新闻页面现在
    @Streaming
    @GET
    Observable<XinWenEntity> downloadXinWenFile(@Url String filePath);

    //数字报--版面页下载
    @Streaming
    @GET
    Observable<JournalEntity> downloadBanmianFile(@Url String filePath);

    //数字报--ininService获取Data
    @FormUrlEncoded
    @POST(InterfaceJsonfile.NEWSPAGERDATE)
    Observable<DataEntity> newspagerData(@FieldMap Map<String, String> map);
    //添加浏览量
    @FormUrlEncoded
    @POST(InterfaceJsonfile.ADDVISIT)
    Observable<EmptyEntityList> addvisit(@FieldMap Map<String, String> map);


}
